from django.db import models
from order.models import Order
class Evaluation(models.Model):
    content = models.TextField(verbose_name="评价内容",max_length=256)
    date_time = models.DateTimeField(verbose_name="评价时间",auto_now_add=True)
    order = models.ForeignKey(Order,on_delete=models.CASCADE)
    phone = models.CharField(verbose_name="反馈电话",max_length=11,null=True,blank=True)
    created_time = models.DateTimeField(verbose_name="创建时间",auto_now_add=True)
    updated_time = models.DateTimeField(verbose_name="更新时间",auto_now=True)
    class Meta:
        db_table = "moh_evaluation"
        verbose_name = "评价表"
        verbose_name_plural = "评价表"



    def __str__(self):
        return f"{self.content},{self.phone}"
